package com.ruoyi.salesInvoice.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 销售发票
 */
public class SalesInvoiceModel extends BaseEntity {

    private Long factor;

    public Long getFactor() {
        return factor;
    }

    public void setFactor(Long factor) {
        this.factor = factor;
    }

    private Long allNum;


    private String units;

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        this.units = units;
    }

    public Long getAllNum() {
        return allNum;
    }

    public void setAllNum(Long allNum) {
        this.allNum = allNum;
    }

    /**
     * 销售发票从表自增主键
     */
    private Long salesInvoiceNo;

    /**
     * 销售发票主表主键
     */
    private Long salesInvoiceId;

    /**
     * 销货单子表主键
     */
    private Long saleGoodsModelId;

    /**
     * 销售数量
     */
    private int num;

    /**
     * 剩余数量
     */
    private int remainingNums;

    /**
     * 单价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal purchasePrice;

    /**
     * 税率(1 3 5 13)
     */
    private String taxRate;

    /**
     * 含税单价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxPrice;

    /**
     * 总金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal totalAmount;

    /**
     * 含税金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxAmount;

    public BigDecimal getTaxTotal() {
        return taxTotal;
    }

    public void setTaxTotal(BigDecimal taxTotal) {
        this.taxTotal = taxTotal;
    }

    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxTotal;

    /**
     * 医疗器械注册证编号
     */
    private String medicalNumber;

    /**
     * 产品主键
     */
    private Long productId;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 产品型号规格
     */
    private String productType;

    /**
     * 产品批号
     */
    private String batch;

    /**
     * 产品型号规格单位
     */
    private String unit;

    /**
     * 型号唯一码
     */
    private String modelCode;

    /**
     * 注册证到期日
     */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date medicalEndTime;

    /**
     * 生产厂商
     */
    private String manufacturerName;

    /**
     * 产品生产日期
     */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date productionDate;

    /**
     * 注册证失效日期
     */ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date effectiveDate;

    public Long getSalesInvoiceNo() {
        return salesInvoiceNo;
    }

    public void setSalesInvoiceNo(Long salesInvoiceNo) {
        this.salesInvoiceNo = salesInvoiceNo;
    }

    public Long getSalesInvoiceId() {
        return salesInvoiceId;
    }

    public void setSalesInvoiceId(Long salesInvoiceId) {
        this.salesInvoiceId = salesInvoiceId;
    }

    public Long getSaleGoodsModelId() {
        return saleGoodsModelId;
    }

    public void setSaleGoodsModelId(Long saleGoodsModelId) {
        this.saleGoodsModelId = saleGoodsModelId;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public BigDecimal getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(BigDecimal purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public String getMedicalNumber() {
        return medicalNumber;
    }

    public void setMedicalNumber(String medicalNumber) {
        this.medicalNumber = medicalNumber;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getModelCode() {
        return modelCode;
    }

    public void setModelCode(String modelCode) {
        this.modelCode = modelCode;
    }

    public Date getMedicalEndTime() {
        return medicalEndTime;
    }

    public void setMedicalEndTime(Date medicalEndTime) {
        this.medicalEndTime = medicalEndTime;
    }

    public int getRemainingNums() {
        return remainingNums;
    }

    public void setRemainingNums(int remainingNums) {
        this.remainingNums = remainingNums;
    }

    public String getManufacturerName() {
        return manufacturerName;
    }

    public void setManufacturerName(String manufacturerName) {
        this.manufacturerName = manufacturerName;
    }

    public Date getProductionDate() {
        return productionDate;
    }

    public void setProductionDate(Date productionDate) {
        this.productionDate = productionDate;
    }

    public Date getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(Date effectiveDate) {
        this.effectiveDate = effectiveDate;
    }
}
